package com.sap.tpcd.policybuilder.policymodel ;


/**
 * @author I068988
 * @version 1.0
 * @created 30-sept.-2011 14:12:33
 */
public class Subject extends PolicyElement {

	private String role;
	private String uame;

	public Subject(){
		super();
	}

	public boolean isMapped(){
		return false;
	}

	public Subject(String role, String uame) {
		super();
		this.role = role;
		this.uame = uame;
	}

	/**
	 * @return the role
	 */
	public String getRole() {
		return role;
	}

	/**
	 * @param role the role to set
	 */
	public void setRole(String role) {
		this.role = role;
	}

	/**
	 * @return the uame
	 */
	public String getUame() {
		return uame;
	}

	/**
	 * @param uame the uame to set
	 */
	public void setUame(String uame) {
		this.uame = uame;
	}

	/* (non-Javadoc)
	 * @see java.lang.Object#hashCode()
	 */
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = super.hashCode();
		result = prime * result + ((role == null) ? 0 : role.hashCode());
		result = prime * result + ((uame == null) ? 0 : uame.hashCode());
		return result;
	}

	/* (non-Javadoc)
	 * @see java.lang.Object#equals(java.lang.Object)
	 */
	@Override
	public boolean equals(Object obj) {
		if (this == obj) {
			return true;
		}
		if (!super.equals(obj)) {
			return false;
		}
		if (!(obj instanceof Subject)) {
			return false;
		}
		Subject other = (Subject) obj;
		if (role == null) {
			if (other.role != null) {
				return false;
			}
		} else if (!role.equals(other.role)) {
			return false;
		}
		if (uame == null) {
			if (other.uame != null) {
				return false;
			}
		} else if (!uame.equals(other.uame)) {
			return false;
		}
		return true;
	}
	
	

}